#ifndef XMLRPC_HELPER_H
#define XMLRPC_HELPER_H

#include <string>
#include <memory>
#include <mutex>
#include "xmlrpc/XmlRpcClient.h"

#define pXmlrpcHelper XmlrpcHelper::getXmlrpcHelperInstance()

class XmlrpcHelper
{
public:
    static XmlrpcHelper *getXmlrpcHelperInstance();
    virtual ~XmlrpcHelper();

    /**
     * @brief:  保存参数到参数服务器
     */
    bool saveParameterToServer(const std::string &name, const std::string &value);

private:
    XmlrpcHelper();

private:
    std::mutex clientMutex;
    std::unique_ptr<XmlRpc::XmlRpcClient> xmlRpcClient;
};


#endif //XMLRPC_HELPER_H
